/*
 * @features: 功能
 * @description: 说明
 * @Date: 2020-10-14 20:54:54
 * @Author: judu233(769471424@qq.com)
 * @LastEditTime: 2020-10-25 16:13:24
 * @LastEditors: judu233
 */
import CameraContrl from "../Main/Map/CameraContl";
import LineDraw from "../Main/Map/LineDraw";
import MapDraw from "../Main/Map/MapDraw";
import z from "./Z";

const { ccclass, property } = cc._decorator;

/**  
    * @Title : 新建类
    * @Description : 类说明
 **/
@ccclass
export default class TestManager extends cc.Component {

    @property(MapDraw)
    public mapDraw: MapDraw = null;

    @property(cc.Node)
    public drawParentNode: cc.Node = null;

    @property(CameraContrl)
    public camera: CameraContrl = null;

    /**绘制组件 */
    public lineDrawList: LineDraw[] = [];

    onLoad() {
        //保存绘制组件
        this.drawParentNode.children.forEach(drawNode => this.lineDrawList.push(drawNode.getComponent(LineDraw)));

        //引用
        z.mapDraw = this.mapDraw;
        z.drawComList = this.lineDrawList;
        z.camera = this.camera;
    }

    // update (dt) {}
}
